home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11548 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: rcp6.elan.af.mil!rscernix!danpop
  2. From: danpop@mail.cern.ch (Dan Pop)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Why does the "universal bugfunction" gets() survive in 1996?
  5. Date: 22 Mar 96 18:54:32 GMT
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <danpop.827520872@rscernix>
  8. References: <DoDGq8.Dqq@scn.org> <4irokq$j1b@ferrari.NetXpress.com>
  9. NNTP-Posting-Host: ues5.cern.ch
  10. X-Newsreader: NN version 6.5.0 #7 (NOV)
  11.  
  12. In <4irokq$j1b@ferrari.NetXpress.com> ghporter@NetXpress.com (Glenn H. Porter) writes:
  13.  
  14. >kurt@scn.org (Kurt Cockrum) wrote:
  15. >
  16. >>especially since it's inherently dangerous and is potentially a grave disservice
  17. >>to any user?  
  18. >
  19. >If you use a function that dosn't check the length of the buffer, then
  20. >you have to check the buffer.  It's that simple.
  21.  
  22. I'm afraid it's not that simple.  Once you call gets there is no way
  23. to check the buffer.  By the time gets returns (if ever :-) it may be
  24. already too late.  The fingerd author learned this the hard way, in 1988 :-)
  25.  
  26. >If you don't like it, don't use it.
  27.  
  28. Is there anybody having at least half a clue and liking gets?
  29. This was the point of the original poaster.
  30.  
  31. Dan
  32. --
  33. Dan Pop
  34. CERN, CN Division
  35. Email: danpop@mail.cern.ch 
  36. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  37.